No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. However, you are permitted to make copies of this work, printed or otherwise, as long as said copies are for your personal use only.
Introduction
------------
XFCN Mania brings you three useful XFCNs that you can install into your MPToolBox. The following XFCNs are included: ScreenHeight returns the height in pixels of your main monitor. ScreenWidth returns the width in pixels of your main monitor. BitDepth returns the number of bits your main monitor can display (useful for checking if you can support color).
Installation
------------
To install the XFCNs, open up the XFCN Mania settings document with ResEdit or another resource editor. Select the XFCN you want and copy it. Open MPToolBox with ResEdit and paste the XFCN. Save the changes to MPToolBox and quit ResEdit. That's it. Now, the new XFCN will show up in the list of XFCNs in MicroPhone's Script Editor.
ScreenHeight
------------
If you've ever wanted to know the height of your screen (maybe you want to know how tall a dialog in MPDialoger should grow), this XFCN will be useful to you. It will return the height of the main monitor in pixels. If you have more than one monitor, your main monitor is the one with the menu bar. If you have a menu bar on both monitors, you're beyond the scope of this discussion. To test ScreenHeight, click the sHeight button on the icon bar. It should put up an alert telling you the height of your main monitor in pixels.
ScreenWidth
-----------
If you've ever wanted to know the width of your screen (maybe you want to know how wide a dialog in MPDialoger should grow), this XFCN will be useful to you. It will return the width of the main monitor in pixels. If you have more than one monitor, your main monitor is the one with the menu bar. If you have a menu bar on both monitors, you're beyond the scope of this discussion. To test ScreenWidth, click the sWidth button on the icon bar. It should put up an alert telling you the width of your main monitor in pixels.
BitDepth
--------
This XFCN tells you the depth of your main monitor. For a black and white monitor, it will return 1. For color monitors, it will return 4 for 16 colors, 8 for 256 colors, and some big number if you have more than 256 colors. BitDepth is useful if you want to know what icon or picture to use in an MPDialoger dialog.